<template>
  <right-canvas-template :title="componentData.title" :tabName="componentData.tabName">
    <el-form class="right-paper">
      <dropdown-normal v-model="commonAttr.itemType" :valLists="PAPER_TYPES" label="画板类型" :bIsBtn="false" @change="onChangeAttr" ></dropdown-normal>
      <textarea-normal label="自定义参数" placeholder='{"tool":{"minDistance":10},"simplifySegment":10}' v-model="commonAttr.injectJsClassParams" @change="onChangeAttr"></textarea-normal>
  </el-form>
  </right-canvas-template>
</template>

<script setup lang="ts">
import { useWebComponentStore } from '@/store/web/component'
import { PAPER_TYPES } from '@/const/'

const useWebComponent = useWebComponentStore()

let componentData_: any
const componentData = computed(() => {
  componentData_ = useWebComponent.currentComponentData
  return componentData_
})
let commonAttr_: any
const commonAttr = computed(() => {
  commonAttr_ = useWebComponent.currentComponentData!.commonAttr
  return commonAttr_
})
const onChangeAttr = () => {
  // useWebComponent.updateCurrentComponentData({ commonAttr: commonAttr_ })
}
</script>